import Mock from 'mockjs'
import { $get } from './http'


let userData = {
  id: '334526489542563345',
  img: '0',
  name: '翟枫君',
  status: 1,
  sex: 1,
  age: 26,
  phone: '13800138000',
  address: '广东省佛山市南海区大沥镇五一村3号',
  source: '医生建档',
  tagList: [
    {
      type: 0,
      name: '高血压'
    },
    {
      type: 1,
      name: '低血糖'
    }
  ],
  members: [
    {
      id: '4432575342543543523',
      img: '1',
      name: '韦栋',
      sex: 1,
      age: 58,
      relation: '母亲'
    },
    {
      id: '4432575342543543522',
      img: '2',
      name: '布馨昭',
      sex: 0,
      age: 60,
      relation: '父亲'
    }
  ]
}

Mock.mock('/api/user','get',() => {
  return {
    status: 200,
    message: '查询用户信息成功',
    data: userData
  }
})


export const getUserDetail = (): Promise<any> => {
  return $get('/api/user')
}
